<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/immutable/3.8.2/immutable.min.js"></script>
    <script>
      const im = Immutable;

      // Map的使用


      // const info = {
      //   name: "kobe",
      //   age: 30,
      //   friend: {
      //     name: "aaa",
      //     age: 25,
      //   },
      // };

      // const infoIM = im.Map(info);

      // const obj = infoIM;

      // // info.name = "";
      // const infoIM2 = infoIM.set("name", "why");

      // console.log(obj.get("name"));
      // console.log(infoIM2.get("name"));

      const names = ["aaa", "bbb", "ccc"];
      // const arr = names;
      // names[0] = "why";
      // console.log(arr);

      const nameIM = im.List(names)
      const arrIM = nameIM.set(0,"why")

      console.log(nameIM.get(0));
      console.log(arrIM.get(0));
    </script>
  </body>
</html>
